package day4.zuoye;

import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        System.out.println("请输入一个正整数");
        Scanner input = new Scanner(System.in);
        int sum = 0;
        for (int num = input.nextInt(); num > 0; num /= 10) {
            sum += num % 10;
        }
        System.out.println(sum);
        System.out.println();

    }
}
